export const useRefresh = ({
  initData,
}: {
  initData: () => Promise<any>
}) => {
  onPullDownRefresh(async () => {
    uni.showLoading({ title: '加载中' })
    await initData()
    uni.hideLoading()
    uni.stopPullDownRefresh()
  });
};
